#import "OracleMarvelController.h"
        
#import "OracleMarvelModel.h"
#import "OracleMarvelCell.h"
#import "Masonry.h"

@interface OracleMarvelController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *thriveStillnessTableView;
@property (nonatomic, strong) NSMutableArray *feastRippleDatas;

@end

@implementation OracleMarvelController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self fractalSetupview];
	[self naturalDriftwoodElevatefetchData];
}


//: 获取数据模型
- (void)naturalDriftwoodElevatefetchData {
	
}

- (void)fractalSetupview {
    self.thriveStillnessTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
    self.thriveStillnessTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
    self.thriveStillnessTableView.estimatedRowHeight = 0;
    self.thriveStillnessTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    self.thriveStillnessTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
    self.thriveStillnessTableView.delegate = self;
    self.thriveStillnessTableView.dataSource = self;
	self.thriveStillnessTableView.rowHeight = 52;
    self.thriveStillnessTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
    self.thriveStillnessTableView.showsVerticalScrollIndicator = NO;
    self.thriveStillnessTableView.showsHorizontalScrollIndicator = NO;
    self.thriveStillnessTableView.backgroundColor = UIColor.clearColor;
    [self.thriveStillnessTableView registerClass:[OracleMarvelCell class] forCellReuseIdentifier:NSStringFromClass([OracleMarvelCell class])];
    [self.view addSubview:self.thriveStillnessTableView];
    [self.thriveStillnessTableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.leading.trailing.equalTo(self.view);
        make.top.equalTo(self.view);
        make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
    }];
}

//: 懒加载数据模型数组
- (NSMutableArray *)feastRippleDatas {
	if (!_feastRippleDatas) {
		_feastRippleDatas = [NSMutableArray array];
	}
	return _feastRippleDatas;
}

#pragma mark - UITableView DataSource 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.feastRippleDatas.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    OracleMarvelCell *nostalgiaZestfulApple = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([OracleMarvelCell class])];
    if (nostalgiaZestfulApple == nil) {
        nostalgiaZestfulApple = [[OracleMarvelCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([OracleMarvelCell class])];
    }
    nostalgiaZestfulApple.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return nostalgiaZestfulApple;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
